package com.mszlu.blog.dao.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mszlu.blog.dao.pojo.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysUserMapper extends BaseMapper<SysUser> {
    @Select("select * from ms_sys_user where account=#{account} and password=#{password} limit 1 ")
    SysUser findUser(@Param("account") String account, @Param("password") String password);

    @Select("SELECT count(id) from ms_sys_user;")
    Long selectUserNum();

    @Select("select id from ms_sys_user where nickname like '%${nickname}%' ")
    List<Long> selectIdByNickname(String nickname);
}
